<?php
/**
 * ooPHP - object oriented PHP framework
 * @author Kamil Mikolajczyk ( rego (at) gazeta (dot) pl )
 * @version 1.0
 *
 */

/**
 * Printer writing texts with indention
 * @author Kamil Mikolajczyk ( rego (at) gazeta (dot) pl )
 * @version 1.0
 */
 class Printer
 {
	/**
	 * Prints text with given indention
	 * @param string $text a text to be printed
	 * @param integer $indents number of indents to be printed
	 */
	public static function write($text, $indents = 0)
	{
		while(--$indents >= 0)
			echo "\t";
			echo $text;
	}
	
	/**
	 * Prints text with given indention and new-line
	 * @param string $text a text to be printed
	 * @param integer $indents number of indents to be printed
	 */
	public static function writeln($text, $indents = 0)
	{
		Printer::write($text, $indents);
		echo "\n";
	}
 }
 ?>